#include "ws2812_flowing.h"
#include "main.h"

rgb_t led_1[WS2812_1_NUM];
ws2812_t ws2812_1 = {
    .led_num = WS2812_1_NUM,
    .leds = led_1,
    .send = buff_send_1,
};

rgb_t led_2[WS2812_2_NUM];
ws2812_t ws2812_2 = {
    .led_num = WS2812_2_NUM,
    .leds = led_2,
    .send = buff_send_2,
};

rgb_t led_3[WS2812_3_NUM];
ws2812_t ws2812_3 = {
    .led_num = WS2812_3_NUM,
    .leds = led_3,
    .send = buff_send_3,
};


void flowing(void)
{
    for(int i = 0; i < WS2812_1_NUM; i++)
    {
        ws2812_set_color(&ws2812_1, i, 0xff, 0x00, 0x00);
        ws2812_send(&ws2812_1);
        HAL_Delay(100);
        ws2812_set_color(&ws2812_1, i, 0x00, 0x00, 0x00);
    }
    ws2812_send(&ws2812_1);
}











